package com.byxy.entity;

import java.io.Serializable;
import java.util.HashSet;
import java.util.Set;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;

/**
 * 导游
 * 
 * @author ketsu
 *
 */
@Entity(name = "xt_guide")
public class Guide implements Serializable{
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	@Id
	@GeneratedValue
	private Integer id; // 序号
	@Column(length = 50)
	private String name; // 名字
	@Column(length = 20)
	private String phone; // 电话
	@Column(length = 50)
	private String email; // email
	private boolean sex; // 性别
	@ManyToOne
	@JoinColumn(name="agencyId")// 旅行社Id
	private Agency agency;
	@Column(length = 20)
	private String qq; // QQ
	@Column(length = 50)
	private String remark;//备注

	@OneToMany(mappedBy = "guide")
	private Set<Order> orders = new HashSet<>();

	
	public Guide() {
		super();
	}

	public Guide(Integer id, String name, String phone, String email, boolean sex, Agency agency, String qq,
			String remark) {
		super();
		this.id = id;
		this.name = name;
		this.phone = phone;
		this.email = email;
		this.sex = sex;
		this.agency = agency;
		this.qq = qq;
		this.remark = remark;
	}

	public Agency getAgency() {
		return agency;
	}

	public void setAgency(Agency agency) {
		this.agency = agency;
	}

	public Set<Order> getOrders() {
		return orders;
	}

	public void setOrders(Set<Order> orders) {
		this.orders = orders;
	}

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getPhone() {
		return phone;
	}

	public void setPhone(String phone) {
		this.phone = phone;
	}

	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	public boolean isSex() {
		return sex;
	}

	public void setSex(boolean sex) {
		this.sex = sex;
	}

	public String getQq() {
		return qq;
	}

	public void setQq(String qq) {
		this.qq = qq;
	}

	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

}
